package com.wander.designCreational.simplefactory.factory;

import com.wander.designCreational.simplefactory.product.ApplePhoneImpl;
import com.wander.designCreational.simplefactory.product.HonorPhoneImpl;
import com.wander.designCreational.simplefactory.product.Phone;
import com.wander.designCreational.simplefactory.product.RedmiPhoneImpl;

/**
 * @Author : WDYin
 * @Date : 2020/5/9
 * @Description :
 */
public class FactoryMoreMethod {

    public static Phone getApple() {
        return new ApplePhoneImpl();
    }

    public static Phone getRedmi() {
        return new RedmiPhoneImpl();
    }

    /**
     * 新增华为手机产品，只需要在工厂中增加一个静态方法即可，不需要修改原有的方法
     **/
    public static Phone getHonor() {
        return new HonorPhoneImpl();
    }
}
